using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace EuropeEngulfed.NET
{
    partial class EEMessageBox : Form
    {
        public static DialogResult Show(string text, GameController.playerType player)
        {
            EEMessageBox messageBoxToShow = new EEMessageBox(text, player);
            messageBoxToShow.ShowDialog();
            return messageBoxToShow.DialogResult;
        }

        public static DialogResult Show(string text)
        {
            EEMessageBox messageBoxToShow = new EEMessageBox(text);
            messageBoxToShow.ShowDialog();
            return messageBoxToShow.DialogResult;
        }

        public EEMessageBox(string text)
        {
            InitializeComponent();
            this.questionLabel.Text = text;
        }

        public EEMessageBox(string text, GameController.playerType player)
        {
            InitializeComponent();
            this.questionLabel.Text = text;
            if(player == GameController.playerType.AlliedPlayer)
            {
                this.BackColor = System.Drawing.Color.SkyBlue;
            }
        }

        private void YesButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Yes;
            this.Close();
        }

        private void NoButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.No;
            this.Close();
        }
    }
}